package week8;

import com.sun.jdi.connect.TransportTimeoutException;
import week8.Students;

public class Students {
    private String name;
    private Transport transport;
    public Students(String name, Transport transport){
        this.name=name;
        this.transport=transport;
    }
    public Students(){}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Transport getTransport() {
        return transport;
    }

    public void setTransport(Transport transport) {
        this.transport = transport;
    }
    public void show(){
        System.out.println(name);
        transport.Moveway();
        transport.showInfo();
    }
}
